package com.ktjy.crm.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@TableName("sys_user")
@Data
public class User implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long usrId;
    @TableField("usr_name")
    private String usrName;
    private String usrPassword;
    private Long usrRoleId;
    private Integer usrFlag;
    private Integer version;
    private Boolean deleted;
    @TableField(exist = false)
    private Role role;
    @TableField(exist = false)
    private String roleName;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    public User() {
    }

    public User(String usrName, String usrPassword, Long usrRoleId, Integer usrFlag){
        this.usrName=usrName;
        this.usrPassword=usrPassword;
        this.usrRoleId=usrRoleId;
        this.usrFlag=usrFlag;
    }
}
